package com.sdyeda.readiot.iotinfo;

import java.util.Collections;

public class IotInfo {

	private String id;	//设备编号
	private String iotid;
	private boolean usedtu;
	private String com;
	private String ip;
	private int port;
	private String type;	//sheb


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id.trim();
	}
	
	public String getIotid() {
		return iotid;
	}

	public void setIotid(String iotid) {
		this.iotid = iotid.trim();
		if(this.iotid.length()>16) {
			this.iotid = this.iotid.substring(0, 16);
		}
		if(this.iotid.length()<16) {
			this.iotid = this.iotid + Collections.nCopies(16-this.iotid.length(), "0");
		}
	}

	public boolean isUsedtu() {
		return usedtu;
	}

	public void setUsedtu(boolean usedtu) {
		this.usedtu = usedtu;
	}

	public String getCom() {
		return com;
	}


	public String getIp() {
		return ip;
	}


	public void setIp(String ip) {
		this.ip = ip.trim();
	}
	
	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public void setCom(String com) {
		this.com = com.trim();
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return type.trim();
	}


}
